Some programs contain code which will be executed only under specific conditions depending on factors which often cannot be determined beforehand. In addition, some modern processors implement instruction pipelining. Such processors work on a pipeline model which is fed with a stream of instructions obtained by the instruction fetch unit that has to look at multiple instructions beyond the current instruction to keep the pipeline fed continuously so that multiple functional units are busy executing instructions.
When there are branches in the instruction stream, the next instruction to be fetched can be either the target instruction, if the branch is taken, or the next instruction in sequence following the branch, if the branch is not taken. This can introduce a bubble in the pipeline as it typically takes multiple cycles for a branch to be resolved and fetch the “right” next instruction.